Skip to content

Conversation

@Danil-Grigorev
Copy link
Contributor

@Danil-Grigorev Danil-Grigorev commented Jul 3, 2025

What this PR does / why we need it:

Merges CAPI Operator reconcile implementation with turtles pod. Current implementation omits implementing CAPIProvider directly as a resource for the operator to reconcile.

Main reason for this is that operator holds a lot of type reflection logic, directly assigned to the existing provider types. Example, example2. This requires client wrapper to perform:

  1. Conversion from CAPIProvider to *Provider resource and back to CAPIProvider without losing CAPIProvider custom fields data.
  2. Populate all CAPIProvider fields which are currently set by syncer on regular operator resources, to ensure successful reconcile. Operator in addition always performs patch request on the resource, setting these ephemeral fields on the resource, breaking the no-spec-change GitOps expectation on the resource.

The solution to this is to decouple operator phases, and draw the separation for Core provider vs non-core provider. This needs to be implemented upstream first, and was attempted back in March last year in kubernetes-sigs/cluster-api-operator#475. Omitting generics introduction, it separates phases into core vs non-core.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Depends on #1510
Fixes #1397, #1415, #1413

Special notes for your reviewer:

Long run: https://github.com/rancher/turtles/actions/runs/16115602289

Checklist:

  • squashed commits into logical changes
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

@Danil-Grigorev Danil-Grigorev changed the title Embed capio reconcile Embed CAPI Operator reconcile inside turtles pod Jul 3, 2025
@Danil-Grigorev Danil-Grigorev force-pushed the embed-capio-reconcile branch from ef04575 to 77d2f08 Compare July 3, 2025 16:22
Signed-off-by: Danil-Grigorev <[email protected]>
Signed-off-by: Danil-Grigorev <[email protected]>
@Danil-Grigorev Danil-Grigorev force-pushed the embed-capio-reconcile branch from 4bd098e to 9e60e2e Compare July 7, 2025 06:52
@Danil-Grigorev Danil-Grigorev added kind/enhancement Categorizes issue or PR as related to a new feature. area/operator ok-to-test Allow CI run on PR labels Jul 7, 2025
@Danil-Grigorev Danil-Grigorev marked this pull request as ready for review July 7, 2025 11:00
@Danil-Grigorev Danil-Grigorev requested a review from a team as a code owner July 7, 2025 11:00
@alexander-demicev alexander-demicev moved this to PR to be reviewed in CAPI / Turtles Jul 7, 2025
@Danil-Grigorev Danil-Grigorev dismissed alexander-demicev’s stale review July 7, 2025 13:21

Will continue with operator chart removal after some investigation. It works better and is simpler than a new flag

@Danil-Grigorev Danil-Grigorev moved this from PR to be reviewed to In Progress (8 max) in CAPI / Turtles Jul 7, 2025
@Danil-Grigorev Danil-Grigorev force-pushed the embed-capio-reconcile branch from 357bff1 to 6e71c33 Compare July 7, 2025 14:50
@alexander-demicev alexander-demicev moved this from In Progress (8 max) to PR to be reviewed in CAPI / Turtles Jul 8, 2025
@Danil-Grigorev Danil-Grigorev self-assigned this Jul 8, 2025
Copy link
Contributor

@anmazzotti anmazzotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@alexander-demicev alexander-demicev merged commit 65d9280 into rancher:main Jul 8, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/operator kind/enhancement Categorizes issue or PR as related to a new feature. ok-to-test Allow CI run on PR

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Implement operator provider controller inside turtles pod and remove cert-manager dependency

3 participants